import axios from '@/libs/api.request'

export const login = ({ userName, password }) => {
  const data = {
    userName,
    password
  }
  return axios.postRequest('/login', data)
}

export const getUserInfo = () => {
  return axios.getRequest('/admin/home/get_info')
}

export const logout = () => {
  return axios.getRequest('/admin/home/logout')
}

export const getUserMenu = () => {
  return axios.getRequest('/admin/home/userMenu')
}

export const getUserAuthority = (param) => {
  return axios.postRequest('/user/userAuthority', param)
}

export const getPermissionCodeList = () => {
  return axios.postRequest('/common/getPermissionCodeList')
}
